package com.bwstudio.common.jwt.exception;

import com.bwstudio.common.response.ErrorCodeI;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author buwei
 */
@AllArgsConstructor
@Data
@EqualsAndHashCode(callSuper=false)
public class TokenAuthenticationException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	private String code;

	private String message;

	public TokenAuthenticationException(ErrorCodeI resultCode) {
		this.code = resultCode.getCode();
		this.message = resultCode.getMessage();
	}
}
